﻿
@{
    ViewBag.Title = "Index";
}

<head>
    <style>
        body,
        html,
        #container {
            overflow: hidden;
            width: 100%;
            height: 500px;
            margin: 0;
            font-family: "微软雅黑";
        }
    </style>
    <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=IDnTEctOh8Hu89vU1TyKNiOr1FwkpO44"></script>
</head>
<body>
    <input type="text" id="name" value="" />
    <button type="submit"onclick="Get()" >查询</button>
    <div id="container"></div>
</body>
<script>
    function Get() {
        var name = $("#name").val();
        var map = new BMapGL.Map('container');// 创建Map实例
        map.centerAndZoom(name, 12); // 初始化地图,设置中心点坐标和地图级别
        map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
    }
   
</script>

